{% extends "base/base.html" %}

{% comment %}

 Copyright 2013 - Tom Alessi

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and 
 limitations under the License.

{% endcomment %}

{% load url from future %}

{% block content %}

	<div class="row">
	  <div class="large-5 large-centered columns">
		<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
		  {% csrf_token %}

		  <fieldset>
		    <legend>Login</legend>

		    <div class="spacer_small"></div>

		    <div class="row">
		      <div class="large-3 columns">
				{{form.username.label_tag}}
		      </div>
		      <div class="large-7 columns left">
				<span>{{form.username }}</span>
              	{% if form.username.errors %}
                <small class="error">
                  {% for error in form.username.errors %}{{error}}{% endfor %}
                </small>
              	{% endif %}
		      </div>

		  	</div>

		  	<div class="row">
		      <div class="large-3 columns">
				{{ form.password.label_tag }}
		      </div>
		      <div class="large-7 columns left">
				<span>{{form.password}}</span>
              	{% if form.password.errors %}
                <small class="error">
                  {% for error in form.password.errors %}{{error}}{% endfor %}
                </small>
              	{% endif %}
              </div>
		  	</div>

		  	<div class="row">
		      <div class="large-10 columns">
		      	<input type="hidden" name="next" value="{{ next }}" />
				<input type="submit" class="small button" value="submit"/>
		      </div>
		  	</div>

		    <div class="spacer_small"></div>

		  	<div class="row">
		      <div class="large-10 columns">
				{% if form.errors %}
				 <p class="error">Errors were encountered validating your username/password.  Please ensure both values are correct and try again.</p>
				{% endif %}
              </div>
		  	</div>

	  	  </fieldset>
		</form>
	  </div>
    </div>

{% endblock %}







